<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html>
	<head>
		<meta charset="utf-8">
		<title id="domTitle"></title>
		<link rel="stylesheet" th:href="@{/bootstrap-theme.min.css}">
		<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}" />
		<link rel="stylesheet" th:href="@{/js/ensure.css}" />
		<link rel="stylesheet" th:href="@{/js/booklist/bookInfo_css.css}"/>
		<link rel="stylesheet" th:href="@{/js/booklist/editPoet_css.css}"/>
		
		<script th:src="@{/js/jquery.js}"></script>
		<script th:src="@{/bootstrap/js/bootstrap.min.js}" type="text/javascript"></script>
		<script th:src="@{/js/vue.js}" type="text/javascript" ></script>
		
	</head>
	<body>
		<div id="app" class="container-fluid">
			
			<div class="row">
				<div class="col-md-2" >
					<div class="row">
						<div class="col-md-6" style="margin: 0;">
							<img th:src="|/${session.user.headImg}|" class="author-headImg">
						</div>
						<div class="col-md-6" style="margin-top:10px ;margin-left: 0rem; height: 5rem; 
													line-height: 20px;">
							<label class="ziliao" th:text="|名字:${session.user.username}|"></label><br>
							<label class="ziliao" th:text="|性别:${session.user.gender}|"></label><br>
							<label class="ziliao" th:text="|指数:${session.user.level}|"></label><br>
							<label v-show="false" id="userId" th:text="${session.user.id}"></label>
						</div>
					</div>
				</div>
				<div class="col-md-10" style="margin-top: 10px;">
					<a href="index.html" style="margin-left: 70%; font-size: small;">主页</a>
					<a href="index.html" style="margin-left: 20px;font-size: small;">投稿</a>
					<a href="index.html" style="margin-left: 20px;font-size: small;">联系我们</a>
					<a href="index.html" style="margin-left: 20px;font-size: small;">支持我们</a>
					<a style="margin-left: 1.25rem; font-size: small;" v-show="pageInfo.show" href="">加入我们</a>
					<a style="margin-left: 1.25rem; font-size: small;" v-show="pageInfo.show"
					   th:href="@{'http://localhost:8080/author/logoff'}">退出登录</a>
				</div>
			</div>

		</div>
		<form action="/poet/updatePm" method="post">
			<div class="row col-md-3 col-md-offset-2  author" style="">
				<div class="" >
					<input type="text" class="form-control" placeholder="笔名" th:text="|名字:${session.user.username}|"/>
				</div>
			</div>
			<div class="col-md-3 col-md-offset-1 author" >
				<input type="datetime-local" class="form-control"/>
			</div>
			
			<div class="col-md-3 col-md-offset-4" style="margin-top: 30px;">
				<input class="form-control" type="text" name="poetTitle" id="poetTitle" placeholder="题目" th:text="${session.poet.name}" />
			</div> 
			
			
			<div class="col-md-10 col-md-offset-1"
				 name = "txt" id="editor" style="margin-top: 30px; text-align: center;" th:text="${session.poet.getTxt()}">
				
			</div>
			<div class="col-md-1 col-md-offset-8" style="margin-top: 20px;">
				<input type="submit" class="btn btn-success submit btn-default" value="发&nbsp; &nbsp; &nbsp布" />
			</div>
		</form>
	</body>
	
	<script type="text/javascript" th:src="@{/bootstrap/js/wangEditor.min.js}"></script>
	<script type="text/javascript">
		
		var E = window.wangEditor
		var editor = new E('#editor')
		// 或者 var editor = new E( document.getElementById('editor') )
		editor.create()
		
		var poetInfo = {
			poetTitle : "",
			authorName :"",
			poetType :"",
			poetContent:""
		}
		
		var myselfIfo ={
			userId:0,
			name:'',
			gender:'',
			level:0
		}
		
		var pageInfo ={
			show:true
		}	
			
		var vm = new Vue({
			el:'#app',
			data(){
				return{
					pageInfo:pageInfo,
					myselfIfo:myselfIfo,
					poetInfo:poetInfo,
				}
			}
		})
	</script>
</html>
